package com.loukou.lkt.lkt.enums;


public enum GoodsStockStateEnum {

	
	STATE_Normal( 0, "正常库存" ),
	
	STATE_AllocationStay( 1, "待出库" ),
	
	STATE_AllocationOn( 2, "在途" );
	
	private int id;
	private String comment;
	
	GoodsStockStateEnum( int id, String comment) {
		this.id = id;
		this.comment = comment;
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	
	public static GoodsStockStateEnum parseStateEnum(int id) {
		for (GoodsStockStateEnum stateEnum : GoodsStockStateEnum.values()) {
			if(stateEnum.id == id){
				return stateEnum;
			}
		}
		return STATE_Normal;
	}
}

